/** Copyright (c) 2015—2017 Zerone.Co.Ltd. All rights reserved. */
package com.zerone.pay.merchant.repository.entity;

import com.acooly.core.common.domain.AbstractEntity;
import com.zerone.facade.merchant.enums.PayTrustsEnum;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/** @author glassescat <a href="">零一零一科技</a> */
@Getter
@Setter
@Entity
@Table(
  name = "merchant_pay",
  indexes = {@Index(name = "unique_merchant_id", columnList = "merchant_id", unique = true)}
)
public class MerchantPayEntity extends AbstractEntity {

  /** 商户ID */
  @Column(name = "merchant_id", columnDefinition = "varchar(20) not null comment '商户ID'")
  private String merchantId;

  /** 支付机构 */
  @Enumerated(EnumType.STRING)
  @Column(name = "pay_trusts", columnDefinition = "varchar(64) not null comment '支付机构'")
  private PayTrustsEnum payTrusts;

  /** 支付费率 */
  @Column(name = "rate", columnDefinition = "double default '0' comment '支付费率'")
  private double rate;
}
